﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace _3___ExtractWordsWithSubstring
{
    class Program
    {
        static void Extract(string text)
        {
            string pattern = @"\b\w*test\w*\b";
            MatchCollection matches = Regex.Matches(text, pattern, RegexOptions.IgnoreCase);
            foreach (var item in matches)
            {
                Console.WriteLine(item);
            }
        }
        
        static void Main(string[] args)
        {
            string text = "Testing is important. We need to test everything.";
            Extract(text);
        }
    }
}
